<script>
	export default {
		onLaunch: function() {
			uni.showTabBarRedDot({
				index: 2,
			})
			// console.log('App Launch')
			// //获取聊天信息
			// console.log("正在获取聊天信息。。。。")
			//  console.log(uni.getStorageInfoSync("chatHistory"))
			
			// this.$store.state.dialogueList = uni.getStorageInfoSync("dialogueList")
		},
		//应用生命周期 onShow	当 uni-app 启动，或从后台进入前台显示
		onShow: function() {
			// let that = this
			// if(that.$websocket.getters.sendMsgStatus){
			// 	that.$websocket.dispatch('webSocketInit');
			// }
		},
		onHide: function() {
			//对聊天列表和聊天进行进行本地存储
			// if(uni.getStorageInfoSync("chatHistory")!=null){
				
			// }
			// console.log(this.$store.state.dialogueList)
			console.log("正在存储聊天信息。。。。")
			//uni.removeStorageSync("dialogueList")
			uni.setStorageSync("chatHistory",this.$store.state.chatHistory)
			uni.setStorageSync("dialogueList",this.$store.state.dialogueList)
			//this.$store.state.dialogueList = uni.getStorageInfoSync("dialogueList")
			
		}
	}
</script>

<style>
	/*每个页面公共css */
	
</style>
